package com.chanyachting.emall.action.businesstype;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.chanyachting.emall.service.BusinesstypeService;
import com.chanyachting.emall.serviceImpl.BusinesstypeServiceImpl;
import com.chanyachting.emall.util.RequestUtil;

public class ListAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		

		  List list=new ArrayList();
		  
		  BusinesstypeService bs=new BusinesstypeServiceImpl();
		  
		  list=bs.getAllBusinesstype();
		  
		  RequestUtil ru=new RequestUtil(request);
		  
		  ru.setAttribute("businesstypeList", list);

		  return mapping.findForward("businesstypeList");
	}
	
	
	

}
